Skip to content

compiletest: Add directive dont-require-annotations #139489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Apr 7, 2025

for making matching on specific diagnostic kinds non-exhaustive.

E.g. //@ dont-require-annotations:ERROR, like in the examples in this PR.

cc #139427 (comment)

Closes #132647 FYI @BoxyUwU since you've wanted this.

r? @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 7, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@petrochenkov
Copy link
Contributor Author

Side note: parse_name_value_directive should produce an error if the parsed directive is not in fact a name-value.
Right now we accept and silently ignore some non-sensical stuff like e.g. //@edition (without a value).

@fmease
Copy link
Member

fmease commented Apr 7, 2025

Side note: parse_name_value_directive should produce an error if the parsed directive is not in fact a name-value.
Right now we accept and silently ignore some non-sensical stuff like e.g. //@edition (without a value)

#123760

@jieyouxu
Copy link
Member

jieyouxu commented Apr 8, 2025

Side note: parse_name_value_directive should produce an error if the parsed directive is not in fact a name-value. Right now we accept and silently ignore some non-sensical stuff like e.g. //@edition (without a value).

Yeah, that's a long-standing issue that I want to fix eventually, but doesn't need to block this.

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is a very nice improvement for cases where there's really just unfortunate errors that are too fragile/target-dependent to match against.

@jieyouxu
Copy link
Member

jieyouxu commented Apr 8, 2025

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 8, 2025

📌 Commit d96df45 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 8, 2025
@jieyouxu
Copy link
Member

jieyouxu commented Apr 8, 2025

After #139485 and #139489 (this) I'll make sure to include a dedicated section highlighting/explaining the recent compiletest changes in the next issue of the test infra internal blog post.

@bors
Copy link
Collaborator

bors commented Apr 9, 2025

☔ The latest upstream changes (presumably #139536) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 9, 2025
@petrochenkov
Copy link
Contributor Author

@bors r=jieyouxu

@bors
Copy link
Collaborator

bors commented Apr 9, 2025

📌 Commit 1282912 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 9, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 9, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#138470 (Test interaction between RFC 2229 migration and use closures)
 - rust-lang#138628 (Add more ergonomic clone tests)
 - rust-lang#139164 (std: improve documentation for get_mut() methods regarding forgotten guards)
 - rust-lang#139488 (Add missing regression GUI test)
 - rust-lang#139489 (compiletest: Add directive `dont-require-annotations`)
 - rust-lang#139513 (Report higher-ranked trait error when higher-ranked projection goal fails in new solver)
 - rust-lang#139521 (triagebot: roll compiler reviewers for rustc/unstable book)
 - rust-lang#139532 (Update `u8`-to-and-from-`i8` suggestions.)
 - rust-lang#139551 (report call site of inlined scopes for large assignment lints)
 - rust-lang#139575 (Remove redundant words)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4911635 into rust-lang:master Apr 10, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 10, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2025
Rollup merge of rust-lang#139489 - petrochenkov:noreqann, r=jieyouxu

compiletest: Add directive `dont-require-annotations`

for making matching on specific diagnostic kinds non-exhaustive.

E.g. `//@ dont-require-annotations:ERROR`, like in the examples in this PR.

cc rust-lang#139427 (comment)

Closes rust-lang#132647 FYI `@BoxyUwU` since you've wanted this.

r? `@jieyouxu`
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 19, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#138470 (Test interaction between RFC 2229 migration and use closures)
 - rust-lang#138628 (Add more ergonomic clone tests)
 - rust-lang#139164 (std: improve documentation for get_mut() methods regarding forgotten guards)
 - rust-lang#139488 (Add missing regression GUI test)
 - rust-lang#139489 (compiletest: Add directive `dont-require-annotations`)
 - rust-lang#139513 (Report higher-ranked trait error when higher-ranked projection goal fails in new solver)
 - rust-lang#139521 (triagebot: roll compiler reviewers for rustc/unstable book)
 - rust-lang#139532 (Update `u8`-to-and-from-`i8` suggestions.)
 - rust-lang#139551 (report call site of inlined scopes for large assignment lints)
 - rust-lang#139575 (Remove redundant words)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a dont-check-error-annotations to compiletest
5 participants